package databasetest.zx.com.databasetest.activity;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

import databasetest.zx.com.databasetest.R;
import databasetest.zx.com.databasetest.db.UserDBController;
import databasetest.zx.com.databasetest.model.UserModel;

public class DBQueryActivity extends AppCompatActivity implements View.OnClickListener {
    Button test1_tv;
    Button test2_tv;
    TextView result_tv;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_dbinsert);
        test1_tv = findViewById(R.id.test1_tv);
        test2_tv = findViewById(R.id.test2_tv);
        result_tv = findViewById(R.id.result_tv);
        addListener();
    }

    /**
     *
     */
    private void addListener() {
        test1_tv.setOnClickListener(this);
        test2_tv.setOnClickListener(this);
    }

    private void test1() {
    }

    private void test2() {
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.test1_tv:
                test1();
                break;
            case R.id.test2_tv:
                test2();
                break;
            default:
                break;
        }
    }
}
